home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PROGEDIT / H402.ZIP / ELV17SRC.ZIP / DOC.ZIP / REF.DOC < prev    next >
Text File  |  1992-12-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4.           REF                                                           REF
  5.  
  6.  
  7.  
  8.  
  9.           NAME
  10.                ref - Display a C function header
  11.  
  12.           SYNOPSIS
  13.                ref [-t] [-c class]... [-f file]... tag
  14.  
  15.           DESCRIPTION
  16.                ref quickly  locates and displays the  header of a function.
  17.                To do this,  ref looks in the "tags" file  for the line that
  18.                describes the function,  and then  scans the source file for
  19.                the function.  When  it locates the function, it displays an
  20.                introductory  comment  (if  there  is one),  the  function's
  21.                declaration, and the declarations of all arguments.
  22.  
  23.           SEARCH METHOD
  24.                ref uses  a fairly sophisticated tag  look-up algorithm.  If
  25.                you supply  a filename via  -f file, then  elvis first scans
  26.                the tags file for a  static tag from that file.  This search
  27.                is limited to the tags file in the current directory.
  28.  
  29.                If you supply a  classname via -c class, then elvis searches
  30.                for a  tag from that  class.  This search is  not limited to
  31.                the current directory;  You can supply a list of directories
  32.                in  the environment  variable TAGPATH,  and ref  will search
  33.                through the  "tags" file in each directory  until it finds a
  34.                tag in the desired class.
  35.  
  36.                If  that fails,  ref will  then try to  look up  an ordinary
  37.                global  tag.   This search  checks  all  of the  directories
  38.                listed in TAGPATH, too.
  39.  
  40.                If you've given the -t flag, then ref will simply output the
  41.                tag line that it  found, and then exit.  Without -t, though,
  42.                ref will search  for the tag line.  It will  try to open the
  43.                source file,  which should be  in the same  directory as the
  44.                tags file where the  tag was discovered.  If the source file
  45.                doesn't exist, or is unreadable, then ref will try to open a
  46.                file called "refs"  in that directory.  Either way, ref will
  47.                try to locate the tag, and display whatever it finds.
  48.  
  49.           INTERACTION WITH ELVIS
  50.                ref is  used by  elvis' shift-K  command.  If the  cursor is
  51.                located on a word such as "splat", in the file "foo.c", then
  52.                elvis will invoke ref with the command "ref -f foo.c splat".
  53.  
  54.                If elvis  has been  compiled with the  -DEXTERNAL_TAGS flag,
  55.                then elvis  will use  ref to scan  the tags files.   This is
  56.                slower than the  built-in tag searching, but it allows elvis
  57.                to access the more sophisticated tag lookup provided by ref.
  58.                Other  than  that, external  tags  should  act exactly  like
  59.                internal tags.
  60.  
  61.  
  62.  
  63.  
  64.           Command Reference               1                          Page 1
  65.  
  66.  
  67.  
  68.  
  69.  
  70.           REF                                                           REF
  71.  
  72.  
  73.  
  74.           OPTIONS
  75.                -t   Output tag info, instead of the function header.
  76.  
  77.                -f file
  78.                     The tag  might be a  static function in  file.  You can
  79.                     use several  -f flags to have  ref consider static tags
  80.                     from more than one file.
  81.  
  82.                -c class
  83.                     The tag might be a  member of class class.  You can use
  84.                     several -c  flags to have  ref consider tags  from more
  85.                     than one class.
  86.  
  87.           FILES
  88.                tags List of  function names and  their locations, generated
  89.                     by ctags.
  90.  
  91.                refs Function   headers    extracted   from   source   files
  92.                     (optional).
  93.  
  94.           ENVIRONMENT
  95.                TAGPATH
  96.                     List of  directories to  be searched.  The  elements in
  97.                     the list  are separated  by either semicolons  (for MS-
  98.                     DOS,  Atari TOS,  and  AmigaDos), or  by colons  (every
  99.                     other  operating system).   For each  operating system,
  100.                     ref has a built-in default which is probably adequate.
  101.  
  102.           NOTES
  103.                You might want to  generate a "tags" file the directory that
  104.                contains  the source  code for  standard  C library  on your
  105.                system.  If  licensing restrictions prevent  you from making
  106.                the library source  readable by everybody, then you can have
  107.                ctags generate  a "refs" file,  and make "refs"  readable by
  108.                everybody.
  109.  
  110.                If your  system doesn't come  with the library  source code,
  111.                then  perhaps you  can produce  something workable  from the
  112.                lint libraries.
  113.  
  114.           SEE ALSO
  115.                elvis(1), ctags(1)
  116.  
  117.           AUTHOR
  118.                Steve Kirkendall
  119.                kirkenda@cs.pdx.edu
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.           Command Reference               1                          Page 2
  131.  
  132.  
  133.